// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class BaseStation : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<BaseStation, MasterDbContextLocator>
    {

        public int BaseStationID { get; set; }
        public string BaseStationCode { get; set; }
        public string BaseStationTTCode { get; set; }
        public string BaseStationName { get; set; }
        public string BaseStationType { get; set; }
        public string BaseStationLevel { get; set; }
        public string AreaCode { get; set; }
        public string AreaName { get; set; }
        public string LAC { get; set; }
        public string CellID { get; set; }
        public double? Longitude { get; set; }
        public double? Latitude { get; set; }
        public string Address { get; set; }
        public string MaintPerson { get; set; }
        public string MaintPersonPhone { get; set; }
        public string GenPerson { get; set; }
        public string ManagePerson { get; set; }
        public string PowerSupplyName { get; set; }
        public string Remark { get; set; }
        public int? Status { get; set; }
        public string PrjCode { get; set; }
        public string PrjName { get; set; }
        public string OperationAndManitID { get; set; }
        public string MaintCompany { get; set; }
        public string ReservedNVarchar1 { get; set; }
        public string ReservedNVarchar2 { get; set; }
        public string ReservedNVarchar3 { get; set; }
        public string ReservedNVarchar4 { get; set; }
        public string StationSource { get; set; }
        public string CompanyCode { get; set; }
        public string CompanyName { get; set; }
        public bool? HavaFixGenerator { get; set; }
        public decimal? BatteryDuration { get; set; }
        public string SiteHandoverDetail { get; set; }
        public string OperatorSiteCode1 { get; set; }
        public string OperatorSiteName1 { get; set; }
        public string OperatorSiteCode2 { get; set; }
        public string OperatorSiteName2 { get; set; }
        public string OperatorSiteCode3 { get; set; }
        public string OperatorSiteName3 { get; set; }
        public int? MigrationId { get; set; }
        public string PowerSupplyDevID { get; set; }
        public string FuelTankId { get; set; }
        public string FuelTankTypeId { get; set; }
        public string DTUID660 { get; set; }
        public string RegisteredGenset { get; set; }
        public string RegisteredDtuId { get; set; }
        public bool? BRegisteredGensetRunning { get; set; }
        public bool? BPowerSupplyDetectedRunning { get; set; }
        public bool? BFixGeneratorRunning { get; set; }
        public string GpsLocationRunningDtuId { get; set; }
        public int? BaseStationStyle { get; set; }
        public bool? IsFSU { get; set; }
        public bool? IsGening { get; set; }
        public bool? IsMainsFail { get; set; }
        public bool? IsGenBilled { get; set; }
        public bool? IsBattVoltLow { get; set; }
        public bool? IsFSU_TT { get; set; }
        public bool? IsGening_TT { get; set; }
        public bool? IsMainsFail_TT { get; set; }
        public bool? IsGenBilled_TT { get; set; }
        public bool? IsBattVoltLow_TT { get; set; }
        public bool? IsMainsFail_266 { get; set; }
        public bool? IsGening_266 { get; set; }
        public int? ComputedStatus { get; set; }
        public bool? IsBattVoltLow_266 { get; set; }
        public bool? IsActiveBilling { get; set; }
        public bool? IsOutService_TT { get; set; }
        public bool? IsOutService { get; set; }
        public bool? IsRegisteredBill { get; set; }
        public string AreaTag { get; set; }
        public decimal? Distance2DW { get; set; }
        public string GatewayDevID { get; set; }
        public string AirConditionerDevID { get; set; }
    
        public void Configure(EntityTypeBuilder<BaseStation> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasIndex(e => e.BaseStationCode, "<BaseStation(BaseStationCode,BaseStationTTCode)>");

                entityBuilder.HasIndex(e => e.PrjCode, "NonClusteredIndex-PrjCode");

                entityBuilder.HasIndex(e => new { e.BaseStationID, e.AreaCode, e.BaseStationName, e.PrjCode }, "WXGet_BaseStation");

                entityBuilder.Property(e => e.Address).HasMaxLength(1000);

                entityBuilder.Property(e => e.AirConditionerDevID).HasMaxLength(50);

                entityBuilder.Property(e => e.AreaCode).HasMaxLength(20);

                entityBuilder.Property(e => e.AreaName).HasMaxLength(50);

                entityBuilder.Property(e => e.AreaTag).HasMaxLength(200);

                entityBuilder.Property(e => e.BaseStationCode).HasMaxLength(50);

                entityBuilder.Property(e => e.BaseStationLevel).HasMaxLength(20);

                entityBuilder.Property(e => e.BaseStationName).HasMaxLength(300);

                entityBuilder.Property(e => e.BaseStationTTCode).HasMaxLength(50);

                entityBuilder.Property(e => e.BaseStationType).HasMaxLength(20);

                entityBuilder.Property(e => e.BatteryDuration).HasColumnType("decimal(18, 2)");

                entityBuilder.Property(e => e.CellID).HasMaxLength(20);

                entityBuilder.Property(e => e.CompanyCode).HasMaxLength(50);

                entityBuilder.Property(e => e.CompanyName).HasMaxLength(200);

                entityBuilder.Property(e => e.DTUID660).HasMaxLength(50);

                entityBuilder.Property(e => e.Distance2DW).HasColumnType("decimal(18, 2)");

                entityBuilder.Property(e => e.FuelTankId).HasMaxLength(50);

                entityBuilder.Property(e => e.FuelTankTypeId).HasMaxLength(50);

                entityBuilder.Property(e => e.GatewayDevID).HasMaxLength(100);

                entityBuilder.Property(e => e.GenPerson).HasMaxLength(50);

                entityBuilder.Property(e => e.GpsLocationRunningDtuId).HasMaxLength(50);

                entityBuilder.Property(e => e.LAC).HasMaxLength(20);

                entityBuilder.Property(e => e.MaintCompany).HasMaxLength(200);

                entityBuilder.Property(e => e.MaintPerson).HasMaxLength(50);

                entityBuilder.Property(e => e.MaintPersonPhone).HasMaxLength(50);

                entityBuilder.Property(e => e.ManagePerson).HasMaxLength(50);

                entityBuilder.Property(e => e.OperationAndManitID).HasMaxLength(50);

                entityBuilder.Property(e => e.OperatorSiteCode1).HasMaxLength(100);

                entityBuilder.Property(e => e.OperatorSiteCode2).HasMaxLength(100);

                entityBuilder.Property(e => e.OperatorSiteCode3).HasMaxLength(100);

                entityBuilder.Property(e => e.OperatorSiteName1).HasMaxLength(100);

                entityBuilder.Property(e => e.OperatorSiteName2).HasMaxLength(100);

                entityBuilder.Property(e => e.OperatorSiteName3).HasMaxLength(100);

                entityBuilder.Property(e => e.PowerSupplyDevID).HasMaxLength(100);

                entityBuilder.Property(e => e.PowerSupplyName).HasMaxLength(100);

                entityBuilder.Property(e => e.PrjCode).HasMaxLength(100);

                entityBuilder.Property(e => e.PrjName).HasMaxLength(100);

                entityBuilder.Property(e => e.RegisteredDtuId).HasMaxLength(50);

                entityBuilder.Property(e => e.RegisteredGenset).HasMaxLength(50);

                entityBuilder.Property(e => e.Remark).HasMaxLength(4000);

                entityBuilder.Property(e => e.ReservedNVarchar1).HasMaxLength(100);

                entityBuilder.Property(e => e.ReservedNVarchar2).HasMaxLength(200);

                entityBuilder.Property(e => e.ReservedNVarchar3).HasMaxLength(400);

                entityBuilder.Property(e => e.ReservedNVarchar4).HasMaxLength(800);

                entityBuilder.Property(e => e.SiteHandoverDetail).HasMaxLength(1000);

                entityBuilder.Property(e => e.StationSource).HasMaxLength(200);

                entityBuilder.Property(e => e.Status).HasDefaultValueSql("((1))");
        }

    }
}

